<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<div th:fragment="page2">

    <template id="page2">
        <div class="page2">
            <h1>page2</h1>
            <p>{{count}}</p>
            <el-button @click="reduce">reduce</el-button>

            <div class="table">
                <my-table></my-table>
            </div>
        </div>
    </template>

    <script>
        const Page2 = {
            template:'#page2',
            components:{
                'my-table':Table,
            },
            data(){
                return {
                    count:0,
                }
            },
            methods:{
                reduce(){
                    this.count = this.count-1;
                }
            }
        }
    </script>
</div>
</html>